import java.awt.Color;
import java.awt.Dialog;
import java.awt.Font;
import java.awt.Frame;
import java.awt.GraphicsConfiguration;
import java.awt.Window;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.JApplet;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;

import org.dyno.visual.swing.layouts.Constraints;
import org.dyno.visual.swing.layouts.GroupLayout;
import org.dyno.visual.swing.layouts.Leading;

import beans.b_amo;
import beans.b_mascota;
;
//VS4E -- DO NOT REMOVE THIS LINE!
public class ingreso extends JDialog {

	private static final long serialVersionUID = 1L;
	private JLabel jLabel3;
	private JLabel jLabel2;
	private JLabel jLabel4;
	private JLabel jLabel0;
	private JLabel jLabel1;
	private JTextField jrut;
    private JLabel jLabel5;
	private JTextField jdigitov;
	private JTextField japp;
	private JTextField jdireccion;
	private JTextField jtelefono;
	private JTextField jnombre;
	private JButton jButton0;
	private JTextField japm;
	private JLabel jLabel6;
	private JLabel jLabel7;
	private JTextField jcell;
	private JLabel jLabel8;
	private JTextField jemail;
	private static final String PREFERRED_LOOK_AND_FEEL = "javax.swing.plaf.metal.MetalLookAndFeel";

	public ingreso(Window parent) {
		super(parent);
		initComponents();
	}

	public ingreso(Dialog parent, String title, boolean modal,
			GraphicsConfiguration arg) {
		super(parent, title, modal, arg);
		initComponents();
	}

	public ingreso(Dialog parent, String title, boolean modal) {
		super(parent, title, modal);
		initComponents();
	}

	public ingreso(Dialog parent, String title) {
		super(parent, title);
		initComponents();
	}

	public ingreso(Window parent, String title, ModalityType modalityType,
			GraphicsConfiguration arg) {
		super(parent, title, modalityType, arg);
		initComponents();
	}

	public ingreso(Window parent, String title, ModalityType modalityType) {
		super(parent, title, modalityType);
		initComponents();
	}

	public ingreso(Window parent, String title) {
		super(parent, title);
		initComponents();
	}

	public ingreso(Window parent, ModalityType modalityType) {
		super(parent, modalityType);
		initComponents();
	}

	public ingreso(Frame parent, String title) {
		super(parent, title);
		initComponents();
	}

	public ingreso(Frame parent, boolean modal) {
		super(parent, modal);
		initComponents();
	}

	public ingreso(Frame parent) {
		super(parent);
		initComponents();
	}

	public ingreso() {
		initComponents();
	}

	public ingreso(Dialog parent, boolean modal) {
		super(parent, modal);
		initComponents();
	}

	public ingreso(Dialog parent) {
		super(parent);
		initComponents();
	}

	public ingreso(Frame parent, String title, boolean modal,
			GraphicsConfiguration arg) {
		super(parent, title, modal, arg);
		initComponents();
	}

	public ingreso(Frame parent, String title, boolean modal) {
		super(parent, title, modal);
		initComponents();
	}

	private void initComponents() {
		setFont(new Font("Dialog", Font.PLAIN, 12));
		setBackground(Color.white);
		setForeground(Color.black);
		setLayout(new GroupLayout());
		add(getJLabel4(), new Constraints(new Leading(12, 12, 12), new Leading(12, 12, 12)));
		add(getJLabel0(), new Constraints(new Leading(12, 12, 12), new Leading(38, 10, 10)));
		add(getJTextField0(), new Constraints(new Leading(76, 71, 10, 10), new Leading(10, 12, 12)));
		add(getJLabel5(), new Constraints(new Leading(148, 14, 12, 12), new Leading(10, 12, 12)));
		add(getJTextField1(), new Constraints(new Leading(156, 18, 10, 10), new Leading(10, 12, 12)));
		add(getJLabel3(), new Constraints(new Leading(12, 12, 12), new Leading(164, 12, 12)));
		add(getJLabel2(), new Constraints(new Leading(12, 12, 12), new Leading(130, 12, 12)));
		add(getJLabel6(), new Constraints(new Leading(7, 12, 12), new Leading(94, 12, 12)));
		add(getJLabel1(), new Constraints(new Leading(7, 12, 12), new Leading(60, 17, 12, 12)));
		add(getJTextField2(), new Constraints(new Leading(76, 98, 12, 12), new Leading(40, 12, 12)));
		add(getJTextField3(), new Constraints(new Leading(76, 98, 12, 12), new Leading(62, 12, 12)));
		add(getJTextField6(), new Constraints(new Leading(73, 101, 12, 12), new Leading(94, 12, 12)));
		add(getJTextField4(), new Constraints(new Leading(70, 104, 12, 12), new Leading(126, 12, 12)));
		add(getJTextField5(), new Constraints(new Leading(72, 102, 12, 12), new Leading(160, 12, 12)));
		add(getJButton0(), new Constraints(new Leading(106, 10, 10), new Leading(261, 10, 10)));
		add(getJTextField7(), new Constraints(new Leading(72, 101, 12, 12), new Leading(190, 10, 10)));
		add(getJLabel7(), new Constraints(new Leading(12, 12, 12), new Leading(192, 12, 12)));
		add(getJLabel8(), new Constraints(new Leading(11, 12, 12), new Leading(226, 12, 12)));
		add(getJTextField8(), new Constraints(new Leading(70, 104, 12, 12), new Leading(226, 12, 12)));
		setSize(320, 317);
	}

	private JTextField getJTextField8() {
		if (jemail == null) {
			jemail = new JTextField();
		}
		return jemail;
	}

	private JLabel getJLabel8() {
		if (jLabel8 == null) {
			jLabel8 = new JLabel();
			jLabel8.setText("E-mail");
		}
		return jLabel8;
	}

	private JTextField getJTextField7() {
		if (jcell == null) {
			jcell = new JTextField();
		}
		return jcell;
	}

	private JLabel getJLabel7() {
		if (jLabel7 == null) {
			jLabel7 = new JLabel();
			jLabel7.setText("Celular");
		}
		return jLabel7;
	}

	private JLabel getJLabel6() {
		if (jLabel6 == null) {
			jLabel6 = new JLabel();
			jLabel6.setText("Apellido M");
		}
		return jLabel6;
	}

	private JTextField getJTextField6() {
		if (japm == null) {
			japm = new JTextField();
		}
		return japm;
	}

	private JButton getJButton0() {
		if (jButton0 == null) {
			jButton0 = new JButton();
			jButton0.setText("Mascota");
			jButton0.addMouseListener(new MouseAdapter() {
	
				public void mouseClicked(MouseEvent event) {
					jButton0MouseMouseClicked(event);
				}
			});
		}
		return jButton0;
	}

	private JTextField getJTextField2() {
		if (jnombre == null) {
			jnombre = new JTextField();
		}
		return jnombre;
	}

	private JTextField getJTextField5() {
		if (jtelefono == null) {
			jtelefono = new JTextField();
		}
		return jtelefono;
	}

	private JTextField getJTextField4() {
		if (jdireccion == null) {
			jdireccion = new JTextField();
		}
		return jdireccion;
	}

	private JTextField getJTextField3() {
		if (japp == null) {
			japp = new JTextField();
		}
		return japp;
	}

	private JTextField getJTextField1() {
		if (jdigitov == null) {
			jdigitov = new JTextField();
		}
		return jdigitov;
	}

	private JLabel getJLabel5() {
		if (jLabel5 == null) {
			jLabel5 = new JLabel();
			jLabel5.setText("-");
		}
		return jLabel5;
	}

	private JTextField getJTextField0() {
		
		if (jrut == null) {
			jrut = new JTextField();
		}
		return jrut;
	}

	private JLabel getJLabel1() {
		if (jLabel1 == null) {
			jLabel1 = new JLabel();
			jLabel1.setText("Apellidos P");
		}
		return jLabel1;
	}

	private JLabel getJLabel0() {
		if (jLabel0 == null) {
			jLabel0 = new JLabel();
			jLabel0.setText("Nombre");
		}
		return jLabel0;
	}

	private JLabel getJLabel4() {
		if (jLabel4 == null) {
			jLabel4 = new JLabel();
			jLabel4.setText("RUT");
		}
		return jLabel4;
	}

	private JLabel getJLabel2() {
		if (jLabel2 == null) {
			jLabel2 = new JLabel();
			jLabel2.setText("Direccion");
		}
		return jLabel2;
	}

	private JLabel getJLabel3() {
		if (jLabel3 == null) {
			jLabel3 = new JLabel();
			jLabel3.setText("Telefono");
		}
		return jLabel3;
	}

	private static void installLnF() {
		try {
			String lnfClassname = PREFERRED_LOOK_AND_FEEL;
			if (lnfClassname == null)
				lnfClassname = UIManager.getCrossPlatformLookAndFeelClassName();
			UIManager.setLookAndFeel(lnfClassname);
		} catch (Exception e) {
			System.err.println("Cannot install " + PREFERRED_LOOK_AND_FEEL
					+ " on this platform:" + e.getMessage());
		}
	}

	/**
	 * Main entry of the class.
	 * Note: This class is only created so that you can easily preview the result at runtime.
	 * It is not expected to be managed by the designer.
	 * You can modify it as you like.
	 */
	public static void main(String[] args) {
		installLnF();
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				ingreso dialog = new ingreso();
				dialog.setDefaultCloseOperation(ingreso.DISPOSE_ON_CLOSE);
				dialog.setTitle("ingreso");
				dialog.setLocationRelativeTo(null);
				dialog.getContentPane().setPreferredSize(dialog.getSize());
				dialog.pack();
				dialog.setVisible(true);
			}
		});
	}

	private void jButton0MouseMouseClicked(MouseEvent event) {		
		b_amo a = new b_amo();
		a.setRut(jrut.getText());
		a.setDigito(jdigitov.getText());
		a.setNombre(jnombre.getText());
		a.setDireccion(jdireccion.getText());
		a.setMail(jemail.getText());
		a.setTelefono(jtelefono.getText());
		a.setApp(japp.getText());
		a.setApm(japm.getText());
		a.setCelular(jcell.getText());
		
		//ingreso ingreso = new ingreso();
		ingreso_mascota ing_mas = new ingreso_mascota( a );
		ing_mas.setVisible(true);
		ing_mas.setTitle("Ingreso de Mascotas");
		this.setVisible(false);
		ing_mas.setLocationRelativeTo(null);
	}

	public JTextField getJrut() {
		return jrut;
	}

	public void setJrut(JTextField jrut) {
		this.jrut = jrut;
	}

	public JTextField getJdigitov() {
		return jdigitov;
	}

	public void setJdigitov(JTextField jdigitov) {
		this.jdigitov = jdigitov;
	}
	

}
